clear all;
numADCSamples = 256; % number of ADC samples per chirp
numADCBits = 16; % number of ADC bits per sample
numRX = 4; % number of receivers
numChirps = 38400;
n_chirps = 128;
global c B K T Tc fs f0 lambda d
c=3.0e8;  
B=768e6;       %调频带宽
K=29.982e12;       %调频斜率
T=B/K;         %调频周期
Tc=80e-6;     %chirp总周期
fs=1e7;       %采样率
f0=77e9;       %初始频率
lambda=c/f0;   %雷达信号波长
d=lambda/2;    %天线阵列间距

N = 256;       %距离向FFT点数
M = 128;       %多普勒向FFT点数
Q = 180;       %角度FFT
max_range = c * fs / (2 * B); % 最大距离
max_speed = lambda / (4 * Tc); % 最大速度
a=readDCA1000('D:\20241022\20241110\1.bin');
data_raw = reshape(a,numRX,numADCSamples,numChirps);

for i=1:numRX
    data(:,:,i) = data_raw(i,:,:);
end
[range,speed,angle]  = threedfft(data, N, M, Q, numADCSamples,n_chirps,numRX);
